﻿
@{
    ViewData["Title"] = "AddMaterial";
    Layout = "~/Views/Home/Main.cshtml";
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Demo</title>
    <link href="/layui/css/layui.css" rel="stylesheet">
</head>
<body>
    <h3>
        质检管理/原料质检/添加
    </h3>
    <div class="parent-container">
        <form class="layui-form">
            <div style="border: 2px solid black;">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <h3>质检信息</h3>
                        <label class="layui-form-label">质检编号：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" id="QualityNumber" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">质检名称：</label>
                        <div class="layui-input-block" style="width: 200px;">
                            <input type="text" id="QualityName" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">质检日期：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            
                            <input type="text" class="layui-input" id="QualityTime" placeholder="yyyy年MM月dd日">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">质检人：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" id="Qualityer" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">供应商：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select id="Supplier">
                                <option value="">请选择供应商</option>
                                <option value="供应商一">供应商一</option>
                                <option value="供应商二">供应商二</option>
                           </select>
                        </div>
                    </div>
                </div>
            </div>
            <div style="border: 2px solid black;">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <h3>原料信息</h3>
                        <label class="layui-form-label">原料编号：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" id="MaterialNumber" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">原料名称：</label>
                        <div class="layui-input-block" style="width: 200px;">
                            <input type="text" id="MaterialName" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">单位：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select id="Unit">
                                <option value="">请选择单位</option>
                                 <option value="个">个</option>
                                <option value="箱">箱</option>
                                <option value="件">件</option>
                                <option value="套">套</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">规格型号：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select id="SpecificationsModel" required lay-verify="required" lay-search>
                                <option value="">请选择型号</option>
                                <option value="M8">M8</option>
                                <option value="M16">M16</option>
                                <option value="M32">M32</option>
                                <option value="M10">M10</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">原料批次号：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" id="batchNumber" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline">
                        <label class="layui-form-label">尺寸：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select id="Size" required lay-verify="required" lay-search>
                            <option value="">请选择尺寸</option>
                            <option value="8mm">8mm</option>
                            <option value="16mm">16mm</option>
                            <option value="10mm">10mm</option>
                            <option value="12mm">12mm</option>
                            </select>
                        </div>
                    </div>
                 </div>
      </div>
            <div style="border: 2px solid black;">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <h3>质检信息</h3>
                        <label class="layui-form-label">质检类型：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select id="QualityType" required lay-verify="required" lay-search>
                            <option value="">请选择类型</option>
                            <option value="抽检">抽检</option>
                            <option value="全检">全检</option>
                            </select>
                          
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">质检方案：</label>
                        <div class="layui-input-block" style="width: 200px;">
                            <input type="text" id="QualityScheme" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <input type="button" value="查询" class="layui-btn layui-bg-blue" onclick="XiangBackfill()" />
                   <br />
                    <div class="layui-inline">
                        <label class="layui-form-label">质检状态：</label>
                        <div class="layui-input-block" style="width: 200px;">
                            <input type="radio" name="QualityS" value="启用" title="启用" checked>
                            <input type="radio" name="QualityS" value="禁用" title="禁用">
                        </div>
                    </div>

                    <table class="layui-table" id="carriertable" style="width:500px"></table>

                </div>
            </div>
           <div style="border: 2px solid black;">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <h3>质检明细</h3>
                        <label class="layui-form-label">质检数量：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" id="QualityNum" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">合格量：</label>
                        <div class="layui-input-block" style="width: 200px;">
                            <input type="text" id="AcceptanceQuantity" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">不合格量：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" id="UnqualifiedQuantity" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">质检人：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" id="QualityInspector" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">备注：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" id="Remark" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline">
                        <label class="layui-form-label">质检结果：</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" id="QualityResult" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>
           <div class="layui-form-item">
                <div class="layui-input-block" style="float:right">
                    <input type="button" value="取消" class="layui-btn layui-bg-blue" />
                    <input type="button" value="新增" class="layui-btn layui-bg-blue" onclick="DeviceAdd()" />
                
                </div>
            </div>
        </form>
    </div>
    <!-- 在某个元素中嵌入 ApiUrl -->
    <div id="apiUrl" data-url="@Model.ApiUrl"></div>
    <style>
        .parent-container {
            /* 确保父容器有足够的宽度，并且设置了文本对齐方式 */
            width: 80%; /* 或者您想要的任何宽度 */
            margin: 0 auto; /* 如果父容器本身也需要居中，可以使用这个属性（对于本例不是必需的） */
            text-align: center; /* 使子元素（如h3）在父容器内水平居中 */
            /* 其他样式，如背景颜色、内边距等 */
            padding: 20px; /* 内边距 */
        }
    </style>
    <script src="~/js/quality/addmaterial.js?n=" + new Date()></script>
    <!-- 请勿在项目正式环境中引用该 layui.js 地址 -->
    <script src="//unpkg.com/layui@2.9.21-rc/dist/layui.js"></script>
    <script>
        layui.use(function(){
          var laydate = layui.laydate;
          // 自定义格式
          laydate.render({
            elem: '#QualityTime',
            format: 'yyyy-MM-dd'
          });
        
        });
    </script>

</body>
</html>